package com.itheima02.day11;

/**
 * @author 刘全
 * @date 2021/7/28
 */
public class Test3 {
    public static void main(String[] args) {
        getSum(1, 2, 3, 4);
    }

    private static void getSum(int... i) {
        int sum = 0;
        for (int i1 : i) {
            sum += i1;
        }
        System.out.println(sum);
    }
}
